home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / XMSLIBR1.ARJ / XMSLIB.DOC < prev    next >
Text File  |  1991-08-11  |  5KB  |  102 lines

  1. *******************************************************************************
  2. *                                   xmsLib                                    *
  3. * xms library for TP6.0, Loewy Ron 1991.                                      *
  4. * Last update : Aug. 11, 1991                                                 *
  5. *******************************************************************************
  6.  
  7. Introduction
  8. ------------
  9.  
  10.   xmsLib implements the XMS 2.0 API for Turbo-Pascal 6.0. This package is
  11.  a first step in a project I took that will allow me to use virtual memory
  12.  references for data in turbo pascal, without the regular limitations of
  13.  640K. I have used this library in some in house projects, But I would like
  14.  to comment that I have used heavily only the extended memory allocation
  15.  functions. (I have not used the UMB functions). The source of information
  16.  for the XMS API was the XMS specification Ver 2.0 from July 19, 1988, 
  17.  published and copyrighted by : 
  18.  
  19. Copyright (c) 1988, Microsoft Corporation, Lotus Development
  20. Corporation, Intel Corporation, and AST Research, Inc.
  21.  
  22. Technical documantation
  23. -----------------------
  24.  
  25.   For technical docs, please refer to the XMS specification published
  26.  by the mentioned companies. I will give a brief explanation of the 
  27.  functions defined in the UNIT INTERFACE. A demo test program XMSTEST.PAS
  28.  is included and can be used as a referance for the use of the library.
  29.  
  30. procedure detectXMS; { look for xms existance, and sets global library variables }
  31. procedure setXMSHandlerAddress; { determine XMS driver call address }
  32. procedure getXMSVersionNumber; { get XMS driver version, in XMSVersion, XMMVersion }
  33. function  printXMSVersion : string; { a readable string of the XMS version.. }
  34. function  printXMMVersion : string; { a readable string of the XMM version.. }
  35. function  requestHMA : boolean; { true if request for HMA granted }
  36. function  releaseHMA : boolean; { true if release granted }
  37. function globalEnableA20 : boolean; { A20 line global enable }
  38. function globalDisableA20 : boolean;  { A20 line global disable }
  39. function localEnableA20 : boolean; { A20 line local enable }
  40. function localDisableA20 : boolean; { A20 line local disable }
  41. function queryA20 : boolean; { true if A20 enabled }
  42. procedure queryFreeExtendedMemory(var largestBlock, totalInK : word); { return XMS stats. }
  43. function xmsLargestBlock : word; { return largest available XMB }
  44. function xmsTotalFreeMemory : word; { returns total free extended memory through XMS driver }
  45. function allocateXMB(sizeInK : word; var handle : word) : boolean; { allocate XMB }
  46. function freeXMB(handle : word) : boolean; { free XMB }
  47. function moveXMB(structure : xmsMovePtr) : boolean; { move memory between XMBs or Main Storage }
  48. function moveXMBlock(len : longint; srcHandle : word; srcOfs : longint;
  49.                      dstHandle : word; dstOfs : longint) : boolean; { calls moveXMB with proper parameters }
  50. function mainstgToXMB(len : word; fromPtr : pointer; 
  51.                       toHandle : word; toOfs : longint) : boolean; { 640K memory move to XMB }
  52. function XMBtoMainstg(len : word; toPtr : pointer;
  53.                       fmHandle : word; fmOfs : longint) : boolean; { XMB to 640K normal memory move }
  54. function lockXMB(handle : word) : boolean; { lock XMB }
  55. function unlockXMB(handle : word) : boolean; { unlock XMB }
  56. function getXMBInformation(handle : word; var lockCount, freeHandles : byte;
  57.                            var sizeInK : word) : boolean; { return XMB stats }
  58. function reallocXMB(newSizeInK, handle : word) : boolean; { reallocate XMB }
  59. function requestUMB(sizeInParagraphs : word; var segmentOfUMB : word; 
  60.                     var sizeAllocatedOrAvailable : word) : boolean; { request UMB }
  61. function releaseUMB(segmentOfUMB : word) : boolean; { release UMB }
  62. function xmsErrorStr : string; { return a string with the XMS error }
  63.  
  64.  Notice : I use the term XMB to describe an eXtended Memory Block, where
  65.  the XMS specification will discribe this block as EMB!.
  66.  
  67. Warranty
  68. --------
  69.  
  70.   There is no warranty what so ever, The unit and docs. are supplied as is,
  71.  The author (Loewy Ron), is not, and will not be responsible for any damages,
  72.  lost profits, or inconveniences caused by the use, or inability to
  73.  use this unit. The use of the unit is at your own risk. By using the unit
  74.  you agree to this.
  75.  
  76. General
  77. -------
  78.  
  79.   xmsLib is copyrighted by myself, (c) Loewy Ron, 1991. I release
  80.  the source, and it can be used for non-commercial programs, If you find
  81.  xmsLib worthy, and plan to use it in a commercial product - please
  82.  register it. (An order form is supplied - ORDER.TXT)
  83.  
  84.   No one but myself, is allowed to charge money for xmsLib, 
  85.  except then minimal distribution fees.
  86.  
  87.  
  88. Contact
  89. -------
  90.  
  91.   You can contact me on what-ever you want to at my address at :
  92.  
  93.           Loewy Ron,                            Loewy Ron
  94.           9 Haneveem st.            Or          20 Smolanskin st.
  95.           Herzeliya, 46465,                     Haifa, 34366,
  96.           Israel.                               Israel.
  97.  
  98. Credits
  99. -------
  100.  
  101.   Turbo-Pascal is a copyright of Borland International.
  102.